# encoding=utf-8
class const(object):
    # 表名
    category = "category"  # 在Redis中存的格式是 "category"->category name->category  map
    category_entity = "category_entity"  # 在Redis中存的格式是 "category"->category name->category  map
    book_list = "book_list"  # 在Redis中存的格式是 "book_list"->book name-> book_list map
    book_list_entity = "book_list_entity"  # 在Redis中存的格式是 "book_list"->book name-> book_list map
    author = "author"  # 在Redis中存的格式是 "book_list"->book name-> book_list map
    book = "book"  # 在Redis中存的是 "book"->url-> flag
    chapter = "chapter"
    select = "select"
    book_cache = "book_cache"

    left = "left"
    right = "right"
    home_list = "home_list"

    left_top = "left_top"
    left_mid = "left_mid"
    rigth_book = "rigth_book"

    fenlei = "fenlei"
    quanben = "quanben"

    # 用于判断存储的数据类型
    get = "get"
    zset = "zset"
    set = "set"
    map = "map"
    string = "string"
    list = "list"

    # 存储时使用的贵过期时间
    ex = "ex"  # 过期时间（秒） 这里过期时间是3秒
    px = "px"  # 过期时间（豪秒） 这里过期时间是3豪秒
    time = 0  # 判断是否有时间

    header = {
        "Connection": "close",
        "Accept-Encoding": "gzip, deflate",
        "Accept-Language": "zh-CN,zh;q=0.9",
        "Cookie": "Hm_lvt_007bc30c1abb0ffb7a93b4f3c8e10c5e=1678327483,1678408808,1678524365; cf_clearance=Mud5TUt.jRVNl2vwAJmTTtvDzRr7UZ8axRsWbgX3BrI-1678534801-0-250; clickbids=104533; Hm_lpvt_007bc30c1abb0ffb7a93b4f3c8e10c5e=1678616059; jieqiVisitId=article_articleviews%3D119609%7C104533",
        "Host": "hm.baidu.com",
        "Referer": "https://www.bbiquge.net/",
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36",
    }

    proxies = {"http": None, "https": None}
    error = '出现错误！'

    cate_dir = {'fenlei4': '历史小说', 'fenlei6': '科幻小说', 'fenlei5': '网游小说', 'fenlei2': '修真小说', 'fenlei1': '玄幻小说',
                'fenlei3': '都市小说'}
